<template>
  <div>
 <h1 ref="title1">银河</h1>
 <h2>梦境</h2>
 <h3>唤醒</h3>
 <button @click="showLog">拿到h1</button>
 <hr>
 <h3 ref="a">a</h3>
 <h3 ref="b">b</h3>
 <h3 ref="c">c</h3>
  </div>
</template>
<script lang="ts" setup name="Person">
import { ref ,defineExpose} from "vue";
let title1=ref()
let a=ref()
let b=ref()
let c=ref()
function showLog(){
  console.log(title1.value);
}
defineExpose({a,b,c})
</script>
<style>

</style>